package com.yyj.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.yyj.domain.WaitPay;
import com.yyj.service.WaitPayService;

@Controller
public class WaitPayController {
	@Autowired
	private WaitPayService waitPayService;
@RequestMapping("/balance.do")
public String balance(WaitPay waitPay, Model model) {
	waitPayService.insertWaitPay(waitPay);
	
	WaitPay wap=new WaitPay();
	wap.setGoods_id(waitPay.getGoods_id());
	wap.setAccount(waitPay.getAccount());
	WaitPay wPay=waitPayService.selectWaitPay(wap);
	model.addAttribute("waitpay", wPay);
	return "balance";
}

}
